<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>


{% if request.session.username %}
<p>
    欢迎{{ request.session.username }}
</p>
<p>
    <a href="/blog/logout">退出登录</a>
</p>
<p>
    <a href="/blog/login">进入我的笔记</a>
</p>
{% else %}
    {% if request.COOKIES.username %}
    <p>
        欢迎{{ request.COOKIES.username }}
    </p>
    <p>
        <a href="/blog/logout">退出登录</a>
    </p>
    <p>
        <a href="/blog/login">进入我的笔记</a>
    </p>
    {% else %}
    <p>
        <a href="/blog/login">登录</a>
    </p>
    <p>
        <a href="/blog/reg">注册</a>
    </p>
    {% endif %}

{% endif %}

</body>
</html>